#! /bin/perl

# Inlines all javascript files into one large HTML file.

while(<>)
{
	if(/src\=\"([^\"]+.js)\"/)
	{
		my $fname = $1;
		print "<script type=\"text/javascript\">\n// From File $fname\n";
		open(INFILE, "<$fname") or die $!;
		while(<INFILE>) { print; }
		close(INFILE);
		print "</script>\n";
	}
	else { print; }
}
